﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using LinQ_DTO;

namespace BUS
{
    public class HoaDonBUS
    {
        public List<shop_hoadon> LayDanhSachHoaDon()
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            return hdDAO.LayDanhSachHoaDon();
        }

        public shop_hoadon LayHoaDonsTheoMa(int MaHoaDon)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            return hdDAO.LayHoaDonsTheoMa(MaHoaDon);
        }

        public void XoaHoaDon(int MaHoaDon)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            hdDAO.XoaHoaDon(MaHoaDon);
        }

        public void CapNhatHoaDon(shop_hoadon hdLinq)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            hdDAO.CapNhatHoaDon(hdLinq);
        }

        public void ThemHoaDon(shop_hoadon hdLinq)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            hdDAO.ThemHoaDon(hdLinq);
        }

        public int ThemHoaDon_LayID(shop_hoadon hdLinq)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            return hdDAO.ThemHoaDon_LayID(hdLinq);
        }

        /************************************************************************************************************        *
         * coder: TRAN KINH LY 
         ***********************************************************************************************************/
        public List<shop_hoadon> LayDanhSach_NgayTaoGiamDan()
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            return hdDAO.LayDanhSach_NgayTaoGiamDan();
        }

        public void CapNhatTinhTrangHoaDon(int id)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            hdDAO.CapNhatTinhTrangHoaDon(id);
        }

        public List<shop_hoadon> TimKiemHoaDonTheoThoiGian(DateTime date_start, DateTime date_end)
        {
            HoaDonDAO hdDAO = new HoaDonDAO();
            return hdDAO.TimKiemHoaDonTheoThoiGian(date_start, date_end);
        }

        /************************************************************************************************************        *
         * coder: TRAN KINH LY 
         ***********************************************************************************************************/

    }
}
